]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
tests: Avoid redeclarations with let
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 6 Feb 2018 22:21:39 +0000 (23:21 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 21 Feb 2018 13:30:09 +0000 (14:30 +0100)
Mozjs made this error fatal a while ago, so those tests were broken
by gjs' JS engine updates.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/38

tests/interactive/background-size.js
tests/interactive/gapplication.js

index e313269779d42f93469e51b4d0521074841a5907..f3b780fd962fdee285ac60b2630a1a0f5c9b0a13 100644 (file)
@@ -19,9 +19,9 @@ function test() {
     let scroll = new St.ScrollView();
     vbox.add(scroll, { expand: true });
 
-    let vbox = new St.BoxLayout({ vertical: true,
-                                  style: 'padding: 10px;'
-                                  + 'spacing: 20px;' });
+    vbox = new St.BoxLayout({ vertical: true,
+                              style: 'padding: 10px;'
+                              + 'spacing: 20px;' });
     scroll.add_actor(vbox);
 
     let tbox = null;
index 60a3630b9209dd9177a631280608e353f3491647..479280bf3b7cf35431c77432dd53c1ccd96b7867 100755 (executable)
@@ -39,25 +39,25 @@ function main() {
     action.connect('activate', do_action);
     app.add_action(action);
 
-    let action = new Gio.SimpleAction({ name: 'two' });
+    action = new Gio.SimpleAction({ name: 'two' });
     action.connect('activate', do_action);
     app.add_action(action);
 
-    let action = new Gio.SimpleAction({ name: 'toggle', state: GLib.Variant.new('b', false) });
+    action = new Gio.SimpleAction({ name: 'toggle', state: GLib.Variant.new('b', false) });
     action.connect('activate', do_action_toggle);
     action.connect('notify::state', do_action_state_change);
     app.add_action(action);
 
-    let action = new Gio.SimpleAction({ name: 'disable', enabled: false });
+    action = new Gio.SimpleAction({ name: 'disable', enabled: false });
     action.set_enabled(false);
     action.connect('activate', do_action);
     app.add_action(action);
 
-    let action = new Gio.SimpleAction({ name: 'parameter-int', parameter_type: GLib.VariantType.new('u') });
+    action = new Gio.SimpleAction({ name: 'parameter-int', parameter_type: GLib.VariantType.new('u') });
     action.connect('activate', do_action_param);
     app.add_action(action);
 
-    let action = new Gio.SimpleAction({ name: 'parameter-string', parameter_type: GLib.VariantType.new('s') });
+    action = new Gio.SimpleAction({ name: 'parameter-string', parameter_type: GLib.VariantType.new('s') });
     action.connect('activate', do_action_param);
     app.add_action(action);
 
@@ -89,7 +89,7 @@ function main() {
     item.set_action_and_target_value('app.parameter-int', GLib.Variant.new('u', 42));
     menu.append_item(item);
 
-    let item = Gio.MenuItem.new('Say 43', null);
+    item = Gio.MenuItem.new('Say 43', null);
     item.set_action_and_target_value('app.parameter-int', GLib.Variant.new('u', 43));
     menu.append_item(item);